package com.example.demo.mapper;

import com.example.demo.entity.Pass;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@Mapper
public interface PassMapper {

    @Select("select * from pass")
    List<Pass> selectAllPass();

    @Select("select * from pass where id=#{id}")
    List<Pass> selectPassById(int id);


    @Insert("insert into pass(id,name,term,ispass,createtime) values(#{id},#{name},#{term},#{ispass},#{createtime})")
    int addPass(Pass p);
}
